class Dog{
    private String name;
    private int age;

    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }
}
public class Test {
     public static void main(String[] args) {
         Dog d=new Dog("大黄",12);
//         System.out.println(Dog.name);
         System.out.println(d.getName());
         System.out.println(d.getAge());

     }
}
